//
//  CLHTableViewSectionHeaderFooterView.m
//  ListViewModel_Example
//
//  Created by 曹连华 on 2022/7/15.
//  Copyright © 2022 clh2046@163.com. All rights reserved.
//

#import "CLHTableViewSectionHeaderFooterView.h"
@interface CLHTableViewSectionHeaderFooterView ()

@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation CLHTableViewSectionHeaderFooterView

- (void)initUI {
    [super initUI];
    self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(5, 5, [UIScreen mainScreen].bounds.size.width-10, self.bounds.size.height)];
    self.titleLabel.backgroundColor = [UIColor blueColor];
    self.titleLabel.textColor = [UIColor whiteColor];
    [self.contentView addSubview:self.titleLabel];
}

- (void)updateWithHeaderFooterModel:(LVBaseSectionHeaderFooterModel *)headerFooterModel atSection:(NSInteger)section {
    [super updateWithHeaderFooterModel:headerFooterModel atSection:section];
    self.titleLabel.text = headerFooterModel.headerFooterTitle;
    self.titleLabel.frame = CGRectMake(10, 0, self.bounds.size.width - 20, self.bounds.size.height);
}

@end
